package com.kkb.kkbcommon.annotation.validation.annotation;

import com.kkb.kkbcommon.annotation.validation.validator.PhoneNumberValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @Author: 朱明亮
 * @Description: 自定义注解用于检查字段是否为手机号
 * @Data Created in 2021-08-20 14:23:57
 * @Modified by:
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = PhoneNumberValidator.class)
public @interface PhoneNumber {
    String message() default "手机号码校验不通过，请重试";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}